#ifndef CONFIGURATIONMANAGER_H
#define CONFIGURATIONMANAGER_H

#include <QObject>
#include <QUrl>

class QTabWidget;
class BrowserConfigurationDialog;
class BrowserWidget;

namespace Legenday{

class ConfigurationManager : public QObject
{
	Q_OBJECT

public:
	ConfigurationManager( QObject *parent);
	~ConfigurationManager();

	void setTabWidget(QTabWidget *w);

public slots:
	void setDefaultWebkitConfiguration();

	void showConfigurationDialog();
	void hideConfigurationDialog();
	BrowserWidget* openNewPage();
	BrowserWidget* openNewPage(QUrl url);
	BrowserWidget* openNewPopUp();
	BrowserWidget* openNewPopUp(QUrl url);

private slots:
	void on_configurationDialog_accepted();
	void on_title_changed();

signals:
	void configurationUpdated();

private:
	BrowserConfigurationDialog  *m_configurationDialog;
	QTabWidget                  *m_tabWidget;
};

}

#endif // CONFIGURATIONMANAGER_H
